package com.xh.baselibrary.utils

import com.xh.baselibrary.log.XLog
import junit.framework.TestCase
import org.junit.runner.RunWith
import org.mockito.Mockito
import org.powermock.api.mockito.PowerMockito
import org.powermock.core.classloader.annotations.PrepareForTest
import org.powermock.modules.junit4.PowerMockRunner

/**
 * Copyright (C), 2022, GDC VR Team
 * Author: lxie
 * Date: 2022/7/29
 * Description:
 * History:
 * <author>    <time>     <version>  <desc>
 * lxie    2022/7/29      v0.1       FirstVersion
</desc></version></time></author> */
@RunWith(PowerMockRunner::class)
@PrepareForTest(CommonExample::class,XLog::class)
class CommonExampleTest : TestCase() {

    public override fun setUp() {
        super.setUp()
        PowerMockito.mockStatic(XLog::class.java)
        PowerMockito.mockStatic(CommonExample::class.java)
    }

    fun testDoSomething() {
        PowerMockito.doNothing().`when`(CommonExample::class,"doSomething", Mockito.any())
        CommonExample.doSomething("a")
    }
}